import java.util.LinkedHashSet;

public class LinkedHashSetTest {
    public static void main(String[] args) {
        LinkedHashSet<Object> lset = new LinkedHashSet<Object>();
        lset.add(3);
        lset.add(1);
        lset.add(2);

        for (Object obj : lset) {
            System.out.println(obj); // 3 1 2
        }
    }

}
